package cn.getech.data.development.service;

import cn.getech.data.development.model.req.procjobstatistics.ProcJobStatisticsCompleteReq;
import cn.getech.data.development.model.req.procjobstatistics.ProcJobStatisticsGetLastReq;
import cn.getech.data.development.model.res.procjobstatistics.CompleteStatisticsRes;
import cn.getech.data.development.model.res.procjobstatistics.OfflineDurationTop20Res;
import cn.getech.data.development.model.res.procjobstatistics.ProcJobStatisticsRes;
import cn.getech.data.intelligence.common.utils.NameValue;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.getech.data.intelligence.common.utils.PageUtils2;
import cn.getech.data.development.entity.ProcJobStatisticsEntity;

import java.util.List;
import java.util.Map;

/**
 * 项目任务运行统计
 *
 * @author qiuxinglei
 * @email qiuxinglei@gmail.com
 * @date 2020-09-04 15:45:42
 */
public interface ProcJobStatisticsService extends IService<ProcJobStatisticsEntity> {

    PageUtils2<ProcJobStatisticsEntity> queryPage(Map<String, Object> params);

    ProcJobStatisticsRes getLast(ProcJobStatisticsGetLastReq req);

    List<NameValue<Integer>> offlineWeekRateOfSuccess(ProcJobStatisticsGetLastReq req);

    List<NameValue<Integer>> offlineRunState(ProcJobStatisticsGetLastReq req);

    CompleteStatisticsRes complete(ProcJobStatisticsCompleteReq req, boolean isOffline);

    List<OfflineDurationTop20Res> offlineDurationTop20(ProcJobStatisticsCompleteReq req);
}


